<%@ page import="java.util.List" %>
<%@ page import="com.bw.pojo.Student" %><%--
  Created by IntelliJ IDEA.
  User: Aaking-aline
  Date: 2022-05-11
  Time: 14:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
	<title>查询所有学员信息</title>
</head>
<body>

<%
	List<Student> list = (List<Student>) request.getAttribute("list");

	if(list == null){
		response.sendRedirect("SelectAllServlet");
		return ;
	}

%>

<table>
	<tr>
		<td>学号</td>
		<td>姓名</td>
		<td>年龄</td>
		<td>操作</td>
	</tr>

	<% for (Student stu : list) {%>
		<tr>
			<td><%=stu.getId()%></td>
			<td><%=stu.getName()%></td>
			<td><%=stu.getAge()%></td>
			<td><a href="DeleteServlet?id=<%=stu.getId()%>">删除</a></td>
		</tr>
	<% }%>
</table>
</body>
</html>
